<div class="right-plate">
    <div class="table-thead">
        <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
            <ng-template pTemplate="header">
                <tr class="tableStyle_thead_tr">
                    <!-- <th class="bs-checkbox w5 text-center">
                    <input type="checkbox" #event (click)="_selectAll(event.checked,files)" [checked]="isSelectAll">
                </th> -->
                    <th class="w15 text-left max-w">任务名称</th>
                    <th class="w15 text-left max-w">分配主题词表</th>
                    <th class="w7 text-left max-w">内容数量</th>
                    <th class="w7 text-left max-w">已标完量</th>
                    <th class="w7 test-left max-w">已审核量</th>
                    <th class="w7 test-left max-w">审核者</th>
                    <th class="w7 text-left max-w">任务状态</th>
                    <th class="w7 text-left max-w">审核状态</th>
                    <th class="w11 test-left max-w">审核时间</th>
                    <th class="w11 test-left max-w">创建时间</th>
                    <th class="w15 test-left max-w">操作</th>
                </tr>
            </ng-template>
        </p-treeTable>
    </div>

    <div class="table-tbody">
        <p-treeTable [value]="files" [lazy]="true" (onNodeExpand)="onNodeExpand($event)">
            <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-i="index">
                <tr class="treegrid-2 treegrid-collapsed">
                    <!-- <td class="bs-checkbox w5 text-center">
                            <input type="checkbox" #event (click)="_chose(event.checked,rowData.taskId,files.length)" [checked]="isChose">
                        </td> -->
                    <td class="w15 text-left max-w" title="{{rowData.name}}">
                        <p-treeTableToggler [rowNode]="rowNode" (onNodeExpand)="onNodeExpand($event)"></p-treeTableToggler>
                        {{rowData.name}}
                    </td>
                    
                    <td class="w15 text-left max-w" *ngIf="rowData.idxTaskThemeTableList && rowData.idxTaskThemeTableList.length>0">
                        <span *ngFor="let child of rowData.idxTaskThemeTableList">
                            <span title="{{child.themeWordTableName}}">{{child.themeWordTableName}}</span>&nbsp;
                        </span>
                    </td>
                    <td class="w15 text-left max-w" *ngIf="!rowData.idxTaskThemeTableList || !rowData.idxTaskThemeTableList.length>0">
                        <span class="stateRed">没有主题词</span>
                    </td>
                    <td class="w7 text-left max-w">{{rowData.productCount}}</td>
                    <td class="w7 text-left max-w">{{rowData.completeCount}}</td>
                    <td class="w7 text-left max-w">{{rowData.checkCount}}</td>
                    <td class="w7 text-left max-w">
                        <span *ngIf="rowData.taskCheckBy" title="{{rowData.taskCheckBy}}">{{rowData.taskCheckBy}}</span>
                        <span class="stateRed" *ngIf="!rowData.taskCheckBy" title="没有审核者">没有审核者</span>
                    </td>
                    <td class="w7 text-left max-w">
                        <span class="TC-state TC-right-foot-green01" *ngIf="rowData.taskStatus === 0">正常</span>
                        <span class="TC-state TC-right-foot-orange" *ngIf="rowData.taskStatus === 1">暂停</span>
                    </td>
                    <td class="w7 text-left max-w">
                        <span class="TC-state TC-right-foot-bule" *ngIf="rowData.checkStatus === 0">未审核</span>
                        <span class="TC-state TC-right-foot-orange" *ngIf="rowData.checkStatus === -1">未通过</span>
                        <span class="TC-state TC-right-foot-green01" *ngIf="rowData.checkStatus === 200">已通过</span>
                    </td>
                    <td class="w11">{{rowData.assignDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td class="w11">{{rowData.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                    <td class="w15"> 
                        <span title="查看内容" class="btn-i" *ngIf="right['taskPermissionAudit']['viewContent']" routerLink="/product/content"  [queryParams]="{taskId:rowData.taskId, completeStatus: rowData.completeStatus,parentId:rowData.parentId,taskType:taskType,child:rowData.child}" (click)="initService._init(1)">
                            <img src="assets/new/lookrw.png" width="24px" height="24px">
                        </span>
                        <span title="通过" class="btn-i" *ngIf="rowData.completeStatus != '1' && right['taskPermissionAudit']['approved']" data-toggle="modal" data-target="#setTaskCheckStatus" (click)="checkStatus.setData(rowData, 200);initService._init(1)">
                            <img src="assets/new/shok.png" width="24px" height="24px">
                        </span>
                        <span title="不通过" class="btn-i" *ngIf="rowData.completeStatus != '1' && right['taskPermissionAudit']['notApproved']" data-toggle="modal" data-target="#setTaskCheckStatus" (click)="checkStatus.setData(rowData, -1);initService._init(1)">
                            <img src="assets/new/shno.png" width="24px" height="24px">
                        </span>
                    </td>
                </tr>
            </ng-template>
        </p-treeTable>
    </div>
</div>

<!-- 任务审核Begin -->
<app-product-indexing-task-check #checkStatus (checkEvent)="getTabList();"></app-product-indexing-task-check>
<!-- 任务审核End -->